<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@taglib uri="/struts-tags" prefix="s" %>

<%@page import="models.Usuario"%>

<%@page import="java.util.List"%>
<%@page import="java.util.LinkedList"%>
<%@page import="models.Banda"%><html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>TelaUsr</title> 
	</head>
	<body>
	<%Usuario logado = (Usuario)session.getValue("login"); %>
		<s:label>			
			Bem Vindo <%=logado.getNome() %> <BR/><BR/>
			Voce possui <%=logado.getIdade() %> anos <BR/>
			Endereco cadastrado: <%=logado.getAddress() %><BR/><BR/>	
		</s:label>
		<s:form action="FanAction">			
			<s:textfield key="nomeBand" label="Digite o nome da banda que quer ser fan"></s:textfield>
			<s:submit value="torna-se fan"></s:submit>
		</s:form>
	    <s:iterator value="bands">
		    <s:url id="url" action="gotoBandPage">
	            <s:param name="nome"> <s:property/> </s:param>		            
		    </s:url>		    
		    <s:a href="%{url}"> <s:property/> <br> </s:a>
	  	</s:iterator>
	  	<BR/>
	  	<s:url id="url" action="gotoLogin"></s:url>		    
	    <s:a href="%{url}"> logoff <br/></s:a> 
	</body>
</html>
